/*
 * 用户登录注册
 */
const express = require("express");
const userHandle = require("../router_handle/user");
// 导入路由数据校验的中间件
const expressJoi = require("@escook/express-joi");
// 导入表单校验对象
const { reg_login_schema } = require("../schema/user");
const router = express.Router();
// 注册
router.post("/regist", expressJoi(reg_login_schema), userHandle.regist);
// 登录
router.post("/login", expressJoi(reg_login_schema), userHandle.login);

module.exports = router;